<?php
/**
 * Label.php
 *
 * Label form element.
 *
 * @author		b.wenneker <b.wenneker@gmail.com>, 2010
 */
class Application_Form_Element_Label extends Zend_Form_Element
{
	
	/**
	 * Determines whether or not the label may contain html values.
	 * @var bool $_allowHtml
	 */
	protected $_allowHtml;
	
	/**
	 * __construct() - Label element constructor.
	 *
	 * @author b.wenneker <b.wenneker@gmail.com>, 2010
	 * @param  array|Zend_Config $options
	 * @return void
	 * @throws Zend_Form_Exception if no element name after initialization
	 */
	public function __construct ($options = null)
	{
		parent::__construct('label' . uniqid(), $options);
	}
	
	/**
	 * getAllowHtml() - Returns whether or not the label may contain html values.
	 *
	 * @author b.wenneker <b.wenneker@gmail.com>, 2010
	 */
	public function getAllowHtml ()
	{
		return $this->_allowHtml;
	}
	
	/**
	 * setAllowHtml() - Sets whether or not the label may contain html values.
	 *
	 * @author b.wenneker <b.wenneker@gmail.com>, 2010
	 */
	public function setAllowHtml ($_allowHtml)
	{
		$this->_allowHtml = $_allowHtml;
		return $this;
	}
		
	/**
	 * init()
	 *
	 * @author b.wenneker <b.wenneker@gmail.com>, 2010
	 */
	public function init ()
	{
		// Set ignore flag (used when retrieving values at form level)
		$this->setIgnore(true);
		parent::init();
	}
}